<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ include file="/pages/jsp/internal/include.jsp" %>

<div class="inner_cont">

	<h2><fmt:message key="label.fileModify"/></h2>
	
	<span class="note">
		<fmt:message key="page.modifyFileDescr.description"/>
		
		<c:forEach items="${model.messages}" var="message">
		   	<div id="message"><fmt:message key="${message}"/></div>
		</c:forEach>
		
		<c:forEach items="${model.errors}" var="error">
		   	<div id="error">
		   		<fmt:message key="${error.key}">
		   			<fmt:param value="${error.param1}"/>
		   		</fmt:message>
		   	</div>
		</c:forEach>
	</span>
	
	<c:if test="${not empty model.file}">
		<form  id="manageFileForm" method="post" class="form">
			
			<table id="table" class="tableForm">
				<tr>
			   		<th scope="row">Name</th>
			   		<td> <c:out value="${model.file.name}"/> </td>
			   	</tr>
			   	<tr>
			   		<th scope="row">Description</th>
					<td> <input type="text" value="<c:out value="${model.file.description}"/>" name="description" /> </td>
				</tr>
				<tr>
					<th scope="row">Type</th>
					<td> <c:out value="${model.file.type}"/> </td>
			   	</tr>
			</table>
			
			<input type="hidden"  name="id"     value="<c:out value="${model.file.id}"/>"	/>
			<input type="hidden"  name="name"  	value="<c:out value="${model.file.name}"/>"	/>
			<input type="hidden"  name="type"	value="<c:out value="${model.file.type}"/>" />
			
			<div class="action_bar">	
				<input type="button" class="puls" value="salva" onclick="sendFormForAction('<c:url value="/file/manageFile.htm"/>','manageFileForm','body','modify');"/>
			</div>
		</form>
		
	</c:if>
</div>
    